package com.cy.service;

import com.cy.entity.Account;

import java.sql.SQLException;
import java.util.List;

/**
 * @author 残影
 * @date 2020/9/14 9:48
 */
public interface AccountService {
    /**
     * 保存账户
     *
     * @param account
     */
    void saveAccount(Account account) throws SQLException;

    /**
     * 更新账户
     *
     * @param account
     */
    void updateAccount(Account account) throws SQLException;

    /**
     * 删除账户
     *
     * @param
     */
    void deleteAccount(Integer accountId) throws SQLException;

    /**
     * 根据 id 查询账户
     *
     * @param accountId
     * @return
     */
    Account findAccountById(Integer accountId) throws SQLException;

    /**
     * 查询所有账户
     *
     * @return
     */
    List<Account> findAllAccount() throws SQLException;
}
